home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-02-12 | 5.3 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Fri Feb 11 23:50:18 1994, modified Fri Feb 11 23:50:18 1994, creator 'MMCC', type ASCII, 4808 bytes "ErrorCheck.h" , at 0x1348 382 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 45 72 72 6f 72 43 | 68 65 63 6b 2e 68 00 00 |..ErrorC|heck.h..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 12 c8 00 | 00 01 7e a9 82 10 8a a9 |........|..~.....|
|00000060| 82 10 8a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3a 77 00 00 |........|....:w..|
|00000080| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000090| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000000a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000000b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000000c0| 2f 2f 2f 2f 2f 2f 0d 2f | 2f 0d 2f 2f 20 20 45 72 |//////./|/.// Er|
|000000d0| 72 6f 72 43 68 65 63 6b | 2e 68 0d 2f 2f 0d 2f 2f |rorCheck|.h.//.//|
|000000e0| 20 20 54 68 69 73 20 69 | 73 20 74 68 65 20 68 65 | This i|s the he|
|000000f0| 61 64 65 72 20 66 69 6c | 65 20 66 6f 72 20 45 72 |ader fil|e for Er|
|00000100| 72 6f 72 43 68 65 63 6b | 2e 63 70 2e 20 20 55 73 |rorCheck|.cp. Us|
|00000110| 69 6e 67 20 74 68 69 73 | 20 63 6f 64 65 20 69 74 |ing this| code it|
|00000120| 20 69 73 20 70 6f 73 73 | 69 62 6c 65 0d 2f 2f 20 | is poss|ible.// |
|00000130| 20 74 6f 20 72 65 70 6f | 72 74 20 61 20 77 69 64 | to repo|rt a wid|
|00000140| 65 20 76 61 72 69 65 74 | 79 20 6f 66 20 6d 65 73 |e variet|y of mes|
|00000150| 73 61 67 65 73 20 74 6f | 20 74 68 65 20 75 73 65 |sages to| the use|
|00000160| 72 2c 20 61 6e 64 20 65 | 69 74 68 65 72 20 64 69 |r, and e|ither di|
|00000170| 73 70 6c 61 79 20 61 0d | 2f 2f 20 20 73 69 6d 70 |splay a.|// simp|
|00000180| 6c 65 20 41 6c 65 72 74 | 20 6f 72 20 61 20 6d 6f |le Alert| or a mo|
|00000190| 72 65 20 73 6f 70 68 69 | 73 74 69 63 61 74 65 64 |re sophi|sticated|
|000001a0| 20 64 65 62 75 67 67 69 | 6e 67 20 61 6c 65 72 74 | debuggi|ng alert|
|000001b0| 2e 0d 2f 2f 0d 2f 2f 20 | 20 52 65 6c 61 74 65 64 |..//.// | Related|
|000001c0| 20 46 69 6c 65 73 3a 20 | 20 45 72 72 6f 72 43 68 | Files: | ErrorCh|
|000001d0| 65 63 6b 2e 72 73 72 63 | 20 63 6f 6e 74 61 69 6e |eck.rsrc| contain|
|000001e0| 73 20 74 68 65 20 6d 69 | 6e 69 6d 75 6d 20 6e 75 |s the mi|nimum nu|
|000001f0| 6d 62 65 72 20 6f 66 20 | 72 65 73 6f 75 72 63 65 |mber of |resource|
|00000200| 73 20 74 6f 0d 2f 2f 20 | 20 6f 70 65 72 61 74 65 |s to.// | operate|
|00000210| 20 45 72 72 6f 72 43 68 | 65 63 6b 2e 20 20 49 74 | ErrorCh|eck. It|
|00000220| 20 61 6c 73 6f 20 70 72 | 6f 76 69 64 65 73 20 61 | also pr|ovides a|
|00000230| 20 6c 69 73 74 20 6f 66 | 20 73 74 61 6e 64 61 72 | list of| standar|
|00000240| 64 69 7a 65 64 20 73 74 | 72 69 6e 67 73 20 74 6f |dized st|rings to|
|00000250| 0d 2f 2f 20 20 6f 75 74 | 70 75 74 20 74 79 70 69 |.// out|put typi|
|00000260| 63 61 6c 20 6d 65 73 73 | 61 67 65 73 20 74 6f 20 |cal mess|ages to |
|00000270| 74 68 65 20 75 73 65 72 | 2e 0d 2f 2f 0d 2f 2f 2f |the user|..//.///|
|00000280| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000290| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000002a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000002b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000002c0| 2f 2f 0d 0d 0d 23 69 66 | 6e 64 65 66 20 45 72 72 |//...#if|ndef Err|
|000002d0| 6f 72 43 68 65 63 6b 0d | 23 64 65 66 69 6e 65 20 |orCheck.|#define |
|000002e0| 45 72 72 6f 72 43 68 65 | 63 6b 0d 0d 2f 2f 20 57 |ErrorChe|ck..// W|
|000002f0| 68 65 6e 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |hen the |followin|
|00000300| 67 20 23 64 65 66 69 6e | 65 20 69 73 20 69 6e 63 |g #defin|e is inc|
|00000310| 6c 75 64 65 64 2c 20 6f | 74 68 65 72 20 6d 6f 64 |luded, o|ther mod|
|00000320| 75 6c 65 73 20 61 72 65 | 20 65 78 70 65 63 74 65 |ules are| expecte|
|00000330| 64 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 0d 2f |d to imp|lement./|
|00000340| 2f 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 65 72 72 |/ additi|onal err|
|00000350| 6f 72 20 63 68 65 63 6b | 69 6e 67 20 63 6f 64 65 |or check|ing code|
|00000360| 20 74 68 61 74 20 74 61 | 6b 65 73 20 65 78 74 72 | that ta|kes extr|
|00000370| 61 20 74 69 6d 65 2c 20 | 62 75 74 20 73 74 6f 70 |a time, |but stop|
|00000380| 73 20 62 75 67 73 20 64 | 65 61 64 20 69 6e 0d 2f |s bugs d|ead in./|
|00000390| 2f 20 74 68 65 69 72 20 | 74 72 61 63 6b 73 2e 20 |/ their |tracks. |
|000003a0| 20 49 6e 20 61 64 64 69 | 74 69 6f 6e 2c 20 74 68 | In addi|tion, th|
|000003b0| 65 20 70 72 6f 67 72 61 | 6d 20 64 72 6f 70 73 20 |e progra|m drops |
|000003c0| 72 69 67 68 74 20 69 6e | 74 6f 20 74 68 65 20 6c |right in|to the l|
|000003d0| 6f 63 61 6c 20 64 65 62 | 75 67 67 65 72 0d 2f 2f |ocal deb|ugger.//|
|000003e0| 20 75 73 69 6e 67 20 44 | 65 62 75 67 53 74 72 2c | using D|ebugStr,|
|000003f0| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 62 6f 74 68 | instead| of both|
|00000400| 65 72 69 6e 67 20 74 6f | 20 70 75 74 20 75 70 20 |ering to| put up |
|00000410| 61 20 64 69 61 6c 6f 67 | 20 62 6f 78 2e 2e 2e 2e |a dialog| box....|
|00000420| 2e 20 20 41 6d 6f 6e 67 | 20 6f 74 68 65 72 0d 2f |. Among| other./|
|00000430| 2f 20 74 68 69 6e 67 73 | 2c 20 74 68 69 73 20 61 |/ things|, this a|
|00000440| 6c 6c 6f 77 73 20 75 73 | 20 74 6f 20 69 6e 63 6c |llows us| to incl|
|00000450| 75 64 65 20 73 70 65 63 | 69 61 6c 20 64 65 62 75 |ude spec|ial debu|
|00000460| 67 67 69 6e 67 20 73 74 | 72 69 6e 67 73 20 69 6e |gging st|rings in|
|00000470| 20 6f 75 72 20 63 6f 64 | 65 20 69 6e 20 61 0d 2f | our cod|e in a./|
|00000480| 2f 20 74 72 61 6e 73 70 | 61 72 65 6e 74 20 61 6e |/ transp|arent an|
|00000490| 64 20 65 78 74 65 6e 64 | 61 62 6c 65 20 77 61 79 |d extend|able way|
|000004a0| 2e 0d 0d 2f 2f 20 57 68 | 65 6e 20 63 6f 6d 70 69 |...// Wh|en compi|
|000004b0| 6c 69 6e 67 20 66 69 6e | 61 6c 20 76 65 72 73 69 |ling fin|al versi|
|000004c0| 6f 6e 73 20 28 6f 72 20 | 74 65 73 74 69 6e 67 20 |ons (or |testing |
|000004d0| 66 6f 72 20 70 65 72 66 | 6f 72 6d 61 6e 63 65 29 |for perf|ormance)|
|000004e0| 20 63 6f 6d 6d 65 6e 74 | 20 69 74 20 6f 75 74 0d | comment| it out.|
|000004f0| 0d 23 64 65 66 69 6e 65 | 20 53 41 4e 49 54 59 5f |.#define| SANITY_|
|00000500| 43 48 45 43 4b 0d 0d 2f | 2f 20 20 53 74 72 69 6e |CHECK../|/ Strin|
|00000510| 67 20 63 6f 6e 73 74 61 | 6e 74 73 20 75 73 65 64 |g consta|nts used|
|00000520| 20 69 6e 20 50 61 72 61 | 6d 54 65 78 74 0d 63 6f | in Para|mText.co|
|00000530| 6e 73 74 20 53 74 72 32 | 35 35 20 6b 45 6d 70 74 |nst Str2|55 kEmpt|
|00000540| 79 53 74 72 69 6e 67 20 | 3d 20 22 5c 70 22 3b 0d |yString |= "\p";.|
|00000550| 0d 2f 2f 20 54 68 69 73 | 20 6f 6e 65 20 67 65 74 |.// This| one get|
|00000560| 73 20 75 73 65 64 20 69 | 66 20 74 68 65 20 70 72 |s used i|f the pr|
|00000570| 6f 67 72 61 6d 20 69 73 | 20 75 6e 61 62 6c 65 20 |ogram is| unable |
|00000580| 74 6f 20 6f 62 74 61 69 | 6e 20 61 20 73 74 72 69 |to obtai|n a stri|
|00000590| 6e 67 20 66 72 6f 6d 20 | 74 68 65 20 53 54 52 23 |ng from |the STR#|
|000005a0| 0d 2f 2f 20 72 65 73 6f | 75 72 63 65 2e 20 20 53 |.// reso|urce. S|
|000005b0| 69 6e 63 65 20 74 68 69 | 73 20 69 73 20 68 61 72 |ince thi|s is har|
|000005c0| 64 20 63 6f 64 65 64 2c | 20 74 68 69 73 20 69 73 |d coded,| this is|
|000005d0| 20 6f 62 76 69 6f 75 73 | 6c 79 20 61 20 6c 61 73 | obvious|ly a las|
|000005e0| 74 20 64 69 74 63 68 20 | 63 68 61 6e 63 65 20 74 |t ditch |chance t|
|000005f0| 6f 0d 2f 2f 20 70 75 74 | 20 73 6f 6d 65 74 68 69 |o.// put| somethi|
|00000600| 6e 67 20 75 70 21 0d 63 | 6f 6e 73 74 20 53 74 72 |ng up!.c|onst Str|
|00000610| 32 35 35 20 6b 42 6f 67 | 75 73 45 72 72 6f 72 20 |255 kBog|usError |
|00000620| 3d 20 22 5c 70 55 6e 72 | 65 63 6f 76 65 72 61 62 |= "\pUnr|ecoverab|
|00000630| 6c 65 20 45 72 72 6f 72 | 22 3b 0d 0d 2f 2f 20 45 |le Error|";..// E|
|00000640| 72 72 6f 72 20 73 74 72 | 69 6e 67 73 20 61 72 65 |rror str|ings are|
|00000650| 20 63 6f 6d 62 69 6e 65 | 64 20 69 6e 74 6f 20 63 | combine|d into c|
|00000660| 61 74 65 67 6f 72 69 65 | 73 2c 20 65 61 63 68 20 |ategorie|s, each |
|00000670| 63 61 74 65 67 6f 72 79 | 20 62 65 69 6e 67 20 61 |category| being a|
|00000680| 20 73 65 70 61 72 61 74 | 65 0d 2f 2f 20 53 54 52 | separat|e.// STR|
|00000690| 23 20 72 65 73 6f 75 72 | 63 65 2e 20 20 54 68 69 |# resour|ce. Thi|
|000006a0| 73 20 68 65 61 64 65 72 | 20 63 72 65 61 74 65 73 |s header| creates|
|000006b0| 20 61 20 73 65 74 20 6f | 66 20 67 65 6e 65 72 69 | a set o|f generi|
|000006c0| 63 20 65 72 72 6f 72 73 | 2c 20 75 73 75 61 6c 6c |c errors|, usuall|
|000006d0| 79 20 75 73 65 64 20 74 | 6f 20 66 6c 61 67 0d 2f |y used t|o flag./|
|000006e0| 2f 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 6c 69 6b |/ condit|ions lik|
|000006f0| 65 20 6f 6c 64 65 72 20 | 52 4f 4d 73 20 6f 72 20 |e older |ROMs or |
|00000700| 53 79 73 74 65 6d 20 53 | 6f 66 74 77 61 72 65 2e |System S|oftware.|
|00000710| 20 20 45 61 63 68 20 6d | 61 6a 6f 72 20 6f 62 6a | Each m|ajor obj|
|00000720| 65 63 74 2c 20 6d 6f 64 | 75 6c 65 2c 20 6f 72 0d |ect, mod|ule, or.|
|00000730| 2f 2f 20 73 75 62 73 65 | 63 74 69 6f 6e 20 73 68 |// subse|ction sh|
|00000740| 6f 75 6c 64 20 64 65 66 | 69 6e 65 20 69 74 73 20 |ould def|ine its |
|00000750| 6f 77 6e 20 27 53 54 52 | 23 27 20 72 65 73 6f 75 |own 'STR|#' resou|
|00000760| 72 63 65 20 74 6f 20 68 | 61 6e 64 6c 65 20 65 72 |rce to h|andle er|
|00000770| 72 6f 72 73 20 69 74 20 | 66 6c 61 67 73 2e 0d 2f |rors it |flags../|
|00000780| 2f 0d 2f 2f 20 4e 4f 54 | 45 3a 20 53 6f 6d 65 20 |/.// NOT|E: Some |
|00000790| 6f 66 20 74 68 65 73 65 | 20 65 72 72 6f 73 20 61 |of these| erros a|
|000007a0| 72 65 20 76 65 72 79 20 | 67 65 6e 65 72 69 63 20 |re very |generic |
|000007b0| 61 6e 64 20 73 68 6f 75 | 6c 64 20 62 65 20 6f 76 |and shou|ld be ov|
|000007c0| 65 72 72 69 64 64 65 6e | 20 77 69 74 68 20 61 20 |erridden| with a |
|000007d0| 6d 6f 72 65 0d 2f 2f 20 | 73 70 65 63 69 66 69 63 |more.// |specific|
|000007e0| 20 65 72 72 6f 72 20 73 | 74 72 69 6e 67 20 77 68 | error s|tring wh|
|000007f0| 65 6e 65 76 65 72 20 70 | 6f 73 73 69 62 6c 65 2e |enever p|ossible.|
|00000800| 0d 09 0d 63 6f 6e 73 74 | 20 73 68 6f 72 74 20 72 |...const| short r|
|00000810| 44 65 66 61 75 6c 74 53 | 74 72 69 6e 67 73 20 3d |DefaultS|trings =|
|00000820| 20 35 30 30 30 3b 0d 09 | 09 09 09 09 09 09 09 09 | 5000;..|........|
|00000830| 0d 63 6f 6e 73 74 20 73 | 68 6f 72 74 20 65 72 72 |.const s|hort err|
|00000840| 4f 53 45 72 72 20 3d 20 | 31 3b 09 09 09 2f 2f 20 |OSErr = |1;...// |
|00000850| 54 68 69 73 20 6f 6e 65 | 20 73 68 6f 75 6c 64 20 |This one| should |
|00000860| 70 72 6f 62 61 62 6c 79 | 20 6e 65 76 65 72 20 62 |probably| never b|
|00000870| 65 20 75 73 65 64 20 66 | 6f 72 20 61 20 72 65 61 |e used f|or a rea|
|00000880| 6c 20 65 72 72 6f 72 0d | 63 6f 6e 73 74 20 73 68 |l error.|const sh|
|00000890| 6f 72 74 20 65 72 72 57 | 69 6d 70 79 52 4f 4d 73 |ort errW|impyROMs|
|000008a0| 20 3d 20 32 3b 09 09 2f | 2f 20 55 73 65 64 20 69 | = 2;../|/ Used i|
|000008b0| 66 20 52 4f 4d 73 20 61 | 72 65 20 6f 6c 64 65 72 |f ROMs a|re older|
|000008c0| 20 74 68 61 6e 20 74 68 | 65 20 31 32 38 4b 20 4d | than th|e 128K M|
|000008d0| 61 63 20 50 6c 75 73 20 | 52 4f 4d 73 0d 63 6f 6e |ac Plus |ROMs.con|
|000008e0| 73 74 20 73 68 6f 72 74 | 20 65 72 72 4e 65 65 64 |st short| errNeed|
|000008f0| 53 79 73 74 65 6d 36 20 | 3d 20 33 3b 0d 63 6f 6e |System6 |= 3;.con|
|00000900| 73 74 20 73 68 6f 72 74 | 20 65 72 72 4e 65 65 64 |st short| errNeed|
|00000910| 53 79 73 74 65 6d 36 30 | 37 20 3d 20 34 3b 0d 63 |System60|7 = 4;.c|
|00000920| 6f 6e 73 74 20 73 68 6f | 72 74 20 65 72 72 4e 65 |onst sho|rt errNe|
|00000930| 65 64 53 79 73 74 65 6d | 37 20 3d 20 35 3b 0d 63 |edSystem|7 = 5;.c|
|00000940| 6f 6e 73 74 20 73 68 6f | 72 74 20 65 72 72 57 65 |onst sho|rt errWe|
|00000950| 69 72 64 53 79 73 74 65 | 6d 20 3d 20 36 3b 09 09 |irdSyste|m = 6;..|
|00000960| 2f 2f 20 72 69 67 68 74 | 20 6d 69 6e 69 6d 75 6d |// right| minimum|
|00000970| 20 73 79 73 74 65 6d 2c | 20 62 75 74 20 6d 69 73 | system,| but mis|
|00000980| 73 69 6e 67 20 73 6f 6d | 65 74 68 69 6e 67 20 74 |sing som|ething t|
|00000990| 68 61 74 0d 09 09 09 09 | 09 09 09 09 09 2f 2f 20 |hat.....|.....// |
|000009a0| 73 68 6f 75 6c 64 20 62 | 65 20 74 68 65 72 65 0d |should b|e there.|
|000009b0| 63 6f 6e 73 74 20 73 68 | 6f 72 74 20 65 72 72 4e |const sh|ort errN|
|000009c0| 6f 4d 42 41 52 20 3d 20 | 37 3b 09 09 09 0d 63 6f |oMBAR = |7;....co|
|000009d0| 6e 73 74 20 73 68 6f 72 | 74 20 65 72 72 4e 6f 4d |nst shor|t errNoM|
|000009e0| 45 4e 55 09 3d 20 38 3b | 09 09 09 0d 63 6f 6e 73 |ENU.= 8;|....cons|
|000009f0| 74 20 73 68 6f 72 74 20 | 65 72 72 4e 6f 43 4e 54 |t short |errNoCNT|
|00000a00| 4c 20 3d 20 39 3b 09 09 | 09 0d 63 6f 6e 73 74 20 |L = 9;..|..const |
|00000a10| 73 68 6f 72 74 20 65 72 | 72 4e 6f 57 49 4e 44 09 |short er|rNoWIND.|
|00000a20| 3d 20 31 30 3b 0d 0d 2f | 2f 20 27 41 4c 52 54 27 |= 10;../|/ 'ALRT'|
|00000a30| 20 63 6f 6e 73 74 61 6e | 74 73 20 28 44 49 54 4c | constan|ts (DITL|
|00000a40| 73 20 77 69 6c 6c 20 68 | 61 76 65 20 74 68 65 20 |s will h|ave the |
|00000a50| 73 61 6d 65 20 72 65 73 | 6f 75 72 63 65 20 49 44 |same res|ource ID|
|00000a60| 29 0d 63 6f 6e 73 74 20 | 73 68 6f 72 74 20 72 44 |).const |short rD|
|00000a70| 65 61 74 68 41 6c 65 72 | 74 20 3d 20 35 30 30 30 |eathAler|t = 5000|
|00000a80| 3b 09 09 09 2f 2f 20 41 | 6c 65 72 74 20 72 65 73 |;...// A|lert res|
|00000a90| 6f 75 72 63 65 20 66 6f | 72 20 70 72 6f 67 72 61 |ource fo|r progra|
|00000aa0| 6d 20 63 72 61 73 68 0d | 63 6f 6e 73 74 20 73 68 |m crash.|const sh|
|00000ab0| 6f 72 74 20 72 4e 6f 74 | 44 65 61 64 59 65 74 41 |ort rNot|DeadYetA|
|00000ac0| 6c 65 72 74 20 3d 20 35 | 30 30 31 3b 09 2f 2f 20 |lert = 5|001;.// |
|00000ad0| 41 6c 65 72 74 20 72 65 | 73 6f 75 72 63 65 20 66 |Alert re|source f|
|00000ae0| 6f 72 20 6e 6f 6e 2d 66 | 61 74 61 6c 20 65 72 72 |or non-f|atal err|
|00000af0| 6f 72 2e 0d 0d 0d 2f 2f | 20 20 46 75 6e 63 74 69 |or....//| Functi|
|00000b00| 6f 6e 20 44 65 63 6c 61 | 72 61 74 69 6f 6e 73 0d |on Decla|rations.|
|00000b10| 2f 2f 20 20 49 6e 20 6f | 72 64 65 72 20 74 6f 20 |// In o|rder to |
|00000b20| 6b 65 65 70 20 74 68 65 | 20 69 6e 74 65 72 66 61 |keep the| interfa|
|00000b30| 63 65 20 66 6c 65 78 69 | 62 6c 65 2c 20 49 20 75 |ce flexi|ble, I u|
|00000b40| 73 65 64 20 6f 76 65 72 | 6c 6f 61 64 65 64 20 66 |sed over|loaded f|
|00000b50| 75 6e 63 74 69 6f 6e 73 | 2e 20 20 54 68 65 20 66 |unctions|. The f|
|00000b60| 69 72 73 74 20 66 75 6e | 63 74 69 6f 6e 0d 2f 2f |irst fun|ction.//|
|00000b70| 20 20 64 65 66 69 6e 69 | 74 69 6f 6e 20 69 73 20 | defini|tion is |
|00000b80| 74 68 65 20 6f 6e 65 20 | 74 68 61 74 20 6d 6f 73 |the one |that mos|
|00000b90| 74 20 66 69 6e 61 6c 20 | 70 72 6f 67 72 61 6d 20 |t final |program |
|00000ba0| 65 72 72 6f 72 20 72 6f | 75 74 69 6e 65 73 20 73 |error ro|utines s|
|00000bb0| 68 6f 75 6c 64 20 63 61 | 6c 6c 20 2d 2d 20 6f 6e |hould ca|ll -- on|
|00000bc0| 65 20 74 68 61 74 20 67 | 72 61 62 73 0d 2f 2f 20 |e that g|rabs.// |
|00000bd0| 20 61 20 73 74 72 69 6e | 67 20 66 72 6f 6d 20 61 | a strin|g from a|
|00000be0| 20 72 65 73 6f 75 72 63 | 65 20 61 6e 64 20 64 69 | resourc|e and di|
|00000bf0| 73 70 6c 61 79 73 20 69 | 74 2e 0d 0d 2f 2f 20 20 |splays i|t...// |
|00000c00| 54 68 65 20 6f 74 68 65 | 72 73 20 61 72 65 20 70 |The othe|rs are p|
|00000c10| 72 69 6d 61 72 69 6c 79 | 20 69 6e 74 65 6e 64 65 |rimarily| intende|
|00000c20| 64 20 66 6f 72 20 64 65 | 62 75 67 67 69 6e 67 2c |d for de|bugging,|
|00000c30| 20 62 75 74 20 61 72 65 | 20 69 6e 63 6c 75 64 65 | but are| include|
|00000c40| 64 20 65 76 65 6e 20 69 | 66 20 63 6f 6d 70 69 6c |d even i|f compil|
|00000c50| 65 64 20 69 6e 0d 2f 2f | 20 20 74 68 65 20 66 69 |ed in.//| the fi|
|00000c60| 6e 61 6c 20 76 65 72 73 | 69 6f 6e 2e 20 20 54 68 |nal vers|ion. Th|
|00000c70| 65 79 20 63 6f 75 6c 64 | 20 62 65 20 75 73 65 64 |ey could| be used|
|00000c80| 20 77 68 65 6e 20 74 68 | 65 20 70 72 6f 67 72 61 | when th|e progra|
|00000c90| 6d 20 6e 65 65 64 73 20 | 74 6f 20 70 72 65 73 65 |m needs |to prese|
|00000ca0| 6e 74 20 61 20 63 75 73 | 74 6f 6d 69 7a 65 64 0d |nt a cus|tomized.|
|00000cb0| 2f 2f 20 20 73 74 72 69 | 6e 67 20 74 68 61 74 20 |// stri|ng that |
|00000cc0| 69 74 20 62 75 69 6c 64 | 73 20 62 65 66 6f 72 65 |it build|s before|
|00000cd0| 68 61 6e 64 2e 0d 0d 2f | 2f 20 20 41 6c 6c 20 72 |hand.../|/ All r|
|00000ce0| 6f 75 74 69 6e 65 73 20 | 70 61 73 73 20 69 6e 20 |outines |pass in |
|00000cf0| 61 20 42 6f 6f 6c 65 61 | 6e 20 74 68 61 74 20 74 |a Boolea|n that t|
|00000d00| 65 6c 6c 73 20 77 68 65 | 74 68 65 72 20 6f 72 20 |ells whe|ther or |
|00000d10| 6e 6f 74 20 74 68 69 73 | 20 69 73 20 61 20 66 61 |not this| is a fa|
|00000d20| 74 61 6c 20 65 72 6f 72 | 2e 20 20 0d 0d 65 78 74 |tal eror|. ..ext|
|00000d30| 65 72 6e 20 76 6f 69 64 | 20 45 72 72 6f 72 41 6c |ern void| ErrorAl|
|00000d40| 65 72 74 20 28 73 68 6f | 72 74 20 45 72 72 6f 72 |ert (sho|rt Error|
|00000d50| 53 74 72 69 6e 67 73 4c | 69 73 74 2c 0d 09 09 09 |StringsL|ist,....|
|00000d60| 09 09 09 73 68 6f 72 74 | 20 45 72 72 6f 72 53 74 |...short| ErrorSt|
|00000d70| 72 69 6e 67 4e 75 6d 62 | 65 72 2c 0d 09 09 09 09 |ringNumb|er,.....|
|00000d80| 09 09 42 6f 6f 6c 65 61 | 6e 20 44 65 61 64 4f 6e |..Boolea|n DeadOn|
|00000d90| 41 72 72 69 76 61 6c 29 | 3b 0d 0d 2f 2f 20 41 6c |Arrival)|;..// Al|
|00000da0| 6c 6f 77 73 20 74 68 65 | 20 75 73 65 72 20 74 6f |lows the| user to|
|00000db0| 20 73 70 65 63 69 66 79 | 20 61 20 73 70 65 63 69 | specify| a speci|
|00000dc0| 66 69 63 20 73 74 72 69 | 6e 67 2e 20 20 47 72 65 |fic stri|ng. Gre|
|00000dd0| 61 74 20 69 66 20 79 6f | 75 20 6e 65 65 64 20 74 |at if yo|u need t|
|00000de0| 6f 20 62 75 69 6c 64 20 | 74 68 65 20 73 74 72 69 |o build |the stri|
|00000df0| 6e 67 0d 2f 2f 20 62 65 | 66 6f 72 65 68 61 6e 64 |ng.// be|forehand|
|00000e00| 20 6f 72 20 69 66 20 79 | 6f 75 20 6a 75 73 74 20 | or if y|ou just |
|00000e10| 77 61 6e 74 20 74 6f 20 | 69 6e 63 6c 75 64 65 20 |want to |include |
|00000e20| 61 20 44 65 62 75 67 53 | 74 72 2e 20 20 4f 6b 61 |a DebugS|tr. Oka|
|00000e30| 79 2c 20 49 20 67 75 65 | 73 73 20 79 6f 75 20 63 |y, I gue|ss you c|
|00000e40| 6f 75 6c 64 20 6a 75 73 | 74 0d 2f 2f 20 63 61 6c |ould jus|t.// cal|
|00000e50| 6c 20 44 65 62 75 67 53 | 74 72 2c 20 62 75 74 20 |l DebugS|tr, but |
|00000e60| 74 68 69 73 20 77 61 79 | 20 61 6c 6c 20 65 72 72 |this way| all err|
|00000e70| 6f 72 73 20 68 61 76 65 | 20 61 20 63 6f 6e 73 69 |ors have| a consi|
|00000e80| 73 74 65 6e 74 20 69 6e | 74 65 72 66 61 63 65 2e |stent in|terface.|
|00000e90| 0d 0d 65 78 74 65 72 6e | 20 76 6f 69 64 20 45 72 |..extern| void Er|
|00000ea0| 72 6f 72 41 6c 65 72 74 | 20 28 53 74 72 32 35 35 |rorAlert| (Str255|
|00000eb0| 20 45 72 72 6f 72 4d 65 | 73 73 61 67 65 2c 0d 09 | ErrorMe|ssage,..|
|00000ec0| 09 09 09 09 09 42 6f 6f | 6c 65 61 6e 20 44 65 61 |.....Boo|lean Dea|
|00000ed0| 64 4f 6e 41 72 72 69 76 | 61 6c 29 3b 09 09 09 09 |dOnArriv|al);....|
|00000ee0| 09 09 0d 0d 2f 2f 20 54 | 68 69 73 20 6f 6e 65 20 |....// T|his one |
|00000ef0| 63 6f 6d 62 69 6e 65 73 | 20 61 20 73 74 72 69 6e |combines| a strin|
|00000f00| 67 20 61 6e 64 20 61 20 | 73 68 6f 72 74 2c 20 75 |g and a |short, u|
|00000f10| 73 65 66 75 6c 20 66 6f | 72 20 67 69 76 69 6e 67 |seful fo|r giving|
|00000f20| 20 61 20 6e 75 6d 65 72 | 69 63 61 6c 0d 2f 2f 20 | a numer|ical.// |
|00000f30| 65 72 72 6f 72 20 63 6f | 64 65 2c 20 73 75 63 68 |error co|de, such|
|00000f40| 20 61 73 20 61 6e 20 4f | 53 45 72 72 2e 0d 65 78 | as an O|SErr..ex|
|00000f50| 74 65 72 6e 20 76 6f 69 | 64 20 45 72 72 6f 72 41 |tern voi|d ErrorA|
|00000f60| 6c 65 72 74 20 28 53 74 | 72 32 35 35 20 45 72 72 |lert (St|r255 Err|
|00000f70| 6f 72 4d 65 73 73 61 67 | 65 2c 0d 09 09 09 09 09 |orMessag|e,......|
|00000f80| 09 73 68 6f 72 74 20 45 | 72 72 6f 72 4e 75 6d 62 |.short E|rrorNumb|
|00000f90| 65 72 2c 0d 09 09 09 09 | 09 09 42 6f 6f 6c 65 61 |er,.....|..Boolea|
|00000fa0| 6e 20 44 65 61 64 4f 6e | 41 72 72 69 76 61 6c 29 |n DeadOn|Arrival)|
|00000fb0| 3b 0d 09 09 09 09 09 09 | 0d 2f 2f 20 54 68 69 73 |;.......|.// This|
|00000fc0| 20 6c 61 73 74 20 6f 6e | 65 20 63 6f 6d 62 69 6e | last on|e combin|
|00000fd0| 65 73 20 72 65 66 65 72 | 65 6e 63 65 73 20 74 6f |es refer|ences to|
|00000fe0| 20 61 20 73 74 72 69 6e | 67 20 63 6f 6e 74 61 69 | a strin|g contai|
|00000ff0| 6e 65 64 20 69 6e 20 74 | 68 65 20 72 65 73 6f 75 |ned in t|he resou|
|00001000| 72 63 65 20 66 6f 72 6b | 20 77 69 74 68 0d 2f 2f |rce fork| with.//|
|00001010| 20 61 20 6e 75 6d 62 65 | 72 2e 20 20 55 73 75 61 | a numbe|r. Usua|
|00001020| 6c 6c 79 2c 20 74 68 69 | 73 20 69 73 20 75 73 65 |lly, thi|s is use|
|00001030| 64 20 74 6f 20 72 65 70 | 6f 72 74 20 4f 53 45 72 |d to rep|ort OSEr|
|00001040| 72 73 2e 0d 0d 65 78 74 | 65 72 6e 20 76 6f 69 64 |rs...ext|ern void|
|00001050| 20 45 72 72 6f 72 41 6c | 65 72 74 20 28 73 68 6f | ErrorAl|ert (sho|
|00001060| 72 74 20 45 72 72 6f 72 | 53 74 72 69 6e 67 73 4c |rt Error|StringsL|
|00001070| 69 73 74 2c 0d 09 09 09 | 09 09 09 73 68 6f 72 74 |ist,....|...short|
|00001080| 20 45 72 72 6f 72 53 74 | 72 69 6e 67 4e 75 6d 62 | ErrorSt|ringNumb|
|00001090| 65 72 2c 0d 09 09 09 09 | 09 09 73 68 6f 72 74 20 |er,.....|..short |
|000010a0| 45 72 72 6f 72 4e 75 6d | 62 65 72 2c 20 0d 09 09 |ErrorNum|ber, ...|
|000010b0| 09 09 09 09 42 6f 6f 6c | 65 61 6e 20 44 65 61 64 |....Bool|ean Dead|
|000010c0| 4f 6e 41 72 72 69 76 61 | 6c 29 3b 0d 0d 2f 2f 20 |OnArriva|l);..// |
|000010d0| 54 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 20 61 |These ro|utines a|
|000010e0| 72 65 20 75 73 65 64 20 | 66 6f 72 20 73 69 6d 70 |re used |for simp|
|000010f0| 6c 65 20 73 61 6e 69 74 | 79 20 63 68 65 63 6b 69 |le sanit|y checki|
|00001100| 6e 67 20 2d 2d 20 73 69 | 6e 63 65 20 74 68 65 79 |ng -- si|nce they|
|00001110| 20 61 6c 77 61 79 73 20 | 63 61 6c 6c 20 45 72 72 | always |call Err|
|00001120| 6f 72 41 6c 65 72 74 0d | 2f 2f 20 77 69 74 68 6f |orAlert.|// witho|
|00001130| 75 74 20 64 6f 69 6e 67 | 20 61 6e 79 74 68 69 6e |ut doing| anythin|
|00001140| 67 20 6e 69 63 65 2c 20 | 74 68 65 79 20 61 72 65 |g nice, |they are|
|00001150| 6e 27 74 20 73 75 69 74 | 61 62 6c 65 20 66 6f 72 |n't suit|able for|
|00001160| 20 72 6f 62 75 73 74 20 | 65 72 72 6f 72 20 63 68 | robust |error ch|
|00001170| 65 63 6b 69 6e 67 20 63 | 6f 64 65 20 74 68 61 74 |ecking c|ode that|
|00001180| 0d 2f 2f 20 73 68 6f 75 | 6c 64 20 65 78 69 74 20 |.// shou|ld exit |
|00001190| 67 72 61 63 65 66 75 6c | 6c 79 2e 20 20 41 6c 6c |graceful|ly. All|
|000011a0| 20 6f 66 20 74 68 65 6d | 20 72 65 74 75 72 6e 20 | of them| return |
|000011b0| 74 68 65 20 61 63 74 75 | 61 6c 20 65 72 72 6f 72 |the actu|al error|
|000011c0| 20 6e 75 6d 62 65 72 20 | 72 65 74 75 72 6e 65 64 | number |returned|
|000011d0| 20 62 79 20 74 68 65 0d | 2f 2f 20 73 79 73 74 65 | by the.|// syste|
|000011e0| 6d 2e 0d 0d 2f 2f 20 4d | 65 6d 6f 72 79 45 72 72 |m...// M|emoryErr|
|000011f0| 43 68 65 63 6b 20 61 6e | 64 20 52 65 73 6f 75 72 |Check an|d Resour|
|00001200| 63 65 45 72 72 43 68 65 | 63 6b 20 63 68 65 63 6b |ceErrChe|ck check|
|00001210| 20 66 6f 72 20 74 68 65 | 20 61 64 64 69 74 69 6f | for the| additio|
|00001220| 6e 61 6c 20 63 61 73 65 | 20 6f 66 20 61 20 4e 49 |nal case| of a NI|
|00001230| 4c 20 70 6f 69 6e 74 65 | 72 2e 0d 2f 2f 20 42 65 |L pointe|r..// Be|
|00001240| 63 61 75 73 65 20 4d 65 | 6d 6f 72 79 45 72 72 43 |cause Me|moryErrC|
|00001250| 68 65 63 6b 20 63 61 6e | 20 62 65 20 75 73 65 64 |heck can| be used|
|00001260| 20 6f 6e 20 50 74 72 73 | 20 6f 72 20 48 61 6e 64 | on Ptrs| or Hand|
|00001270| 6c 65 73 2c 20 77 65 20 | 75 73 65 20 6f 76 65 72 |les, we |use over|
|00001280| 6c 6f 61 64 65 64 20 66 | 75 6e 63 74 69 6f 6e 73 |loaded f|unctions|
|00001290| 20 61 67 61 69 6e 2e 0d | 65 78 74 65 72 6e 20 76 | again..|extern v|
|000012a0| 6f 69 64 20 4f 53 45 72 | 72 43 68 65 63 6b 20 28 |oid OSEr|rCheck (|
|000012b0| 4f 53 45 72 72 20 65 72 | 72 29 3b 0d 65 78 74 65 |OSErr er|r);.exte|
|000012c0| 72 6e 20 76 6f 69 64 20 | 4d 65 6d 6f 72 79 45 72 |rn void |MemoryEr|
|000012d0| 72 43 68 65 63 6b 20 28 | 48 61 6e 64 6c 65 20 65 |rCheck (|Handle e|
|000012e0| 72 72 29 3b 0d 65 78 74 | 65 72 6e 20 76 6f 69 64 |rr);.ext|ern void|
|000012f0| 20 4d 65 6d 6f 72 79 45 | 72 72 43 68 65 63 6b 20 | MemoryE|rrCheck |
|00001300| 28 50 74 72 20 65 72 72 | 29 3b 0d 65 78 74 65 72 |(Ptr err|);.exter|
|00001310| 6e 20 76 6f 69 64 20 52 | 65 73 6f 75 72 63 65 45 |n void R|esourceE|
|00001320| 72 72 43 68 65 63 6b 20 | 28 48 61 6e 64 6c 65 20 |rrCheck |(Handle |
|00001330| 65 72 72 29 3b 0d 0d 23 | 65 6e 64 69 66 20 45 72 |err);..#|endif Er|
|00001340| 72 6f 72 43 68 65 63 6b | 00 00 00 00 00 00 00 00 |rorCheck|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001390| 00 00 00 01 00 01 00 01 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 04 00 00 00 00 00 08 |........|........|
|000013b0| 0c 45 72 72 6f 72 43 68 | 65 63 6b 2e 68 72 02 00 |.ErrorCh|eck.hr..|
|000013c0| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 68 00 00 |..TEXTMM|CC...h..|
|000013d0| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 68 00 00 |..TEXTMM|CC...h..|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 0f de a9 81 c0 19 00 00 | 12 c8 00 00 01 7e e0 00 |........|.....~..|
|00001400| 00 00 00 00 00 00 00 00 | 00 00 00 01 00 00 ff ff |........|........|
|00001410| ff ff ff ff 00 01 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001420| 00 00 00 00 e7 18 e0 00 | 94 a5 00 00 e7 25 60 00 |........|.....%`.|
|00001430| 84 a5 20 00 84 98 e0 00 | 00 00 00 00 00 00 00 ca |.. .....|........|
|00001440| 00 00 00 00 80 04 00 00 | 00 00 00 08 00 1e 00 00 |........|........|
|00001450| 00 00 00 00 00 00 00 48 | 00 00 00 48 00 00 00 00 |.......H|...H....|
|00001460| 00 01 00 01 00 01 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 00 00 00 00 00 04 | 00 00 00 00 00 08 00 1e |........|........|
|00001480| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00001490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000014a0| 00 00 00 00 00 00 00 03 | 00 04 00 56 00 0a 02 99 |........|...V....|
|000014b0| 02 5e 00 56 00 0a 02 99 | 02 5e a9 81 d8 4b 00 00 |.^.V....|.^...K..|
|000014c0| 04 71 00 00 04 71 00 00 | 00 00 01 00 00 00 01 00 |.q...q..|........|
|000014d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 e9 11 b4 |...L...L|...2....|
|000014e0| 11 a2 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000014f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+